<?php

namespace Database\Factories\Game\Center;

use App\Models\Game\Center\Account;
use App\Models\Game\Center\Package;
use App\Models\Game\Center\WithdrawOrder;
use Illuminate\Database\Eloquent\Factories\Factory;

class WithdrawOrderFactory extends Factory
{
    protected $model = WithdrawOrder::class;

    public function definition()
    {
        return [
            'channel' => ['alipay', 'wechat'][mt_rand(0, 1)],
            'user_id' => Account::factory()->create()->userId,
            'player_id' => Account::factory()->create()->playerId,
            'money' => $this->faker->randomNumber(5),
            'fee' => 0,
            'orderid' => WithdrawOrder::createOrderNo(),
        ];
    }
}
